from flask_restful import fields  # type: ignore
from libs.helper import  TimestampField


order_fields = {
    "id": fields.String,
    "shop_id": fields.String,
    "prod_names": fields.Raw,
    "account_id": fields.String,
    "order_no": fields.String,
    "total": fields.Integer,
    "Total": fields.Float,
    "actual_total": fields.Integer,
    "ActualTotal": fields.Float,
    "pay_type": fields.Integer,
    "remarks": fields.String,
    "status": fields.String,
    "dvy_type": fields.String,
    "dvy_id": fields.String,
    "dvy_flow_id": fields.String,
    "freight_amount": fields.Integer,
    "FreightAmount": fields.Float,
    "addr_order_id": fields.String,
    "prod_nums": fields.Integer,

    "del_status": fields.String,
    "refund_status": fields.String,
    "reduce_amount": fields.Integer,
    "order_type": fields.Integer,
    "close_type": fields.String,
    "created_at": TimestampField,
    "updated_at": TimestampField,
    "pay_at": TimestampField,
    "dvy_at": TimestampField,
    "finally_at": TimestampField,
    "cancel_at": TimestampField,
}

order_list_fields = {
    "total": fields.Integer,
    "has_more": fields.Boolean,
    "data": fields.List(fields.Nested(order_fields)),
    "message": fields.String,
}